Skip to content

Remove NormalizeNamespaceByPSR4ComposerAutoloadRector as only moves files to namespaces, does not update any class referenes; better use IDE here#4057

Merged
TomasVotruba merged 1 commit intomainfrom
tv-less-psr4-namespace
Jun 3, 2023
Merged

Remove NormalizeNamespaceByPSR4ComposerAutoloadRector as only moves files to namespaces, does not update any class referenes; better use IDE here#4057
TomasVotruba merged 1 commit intomainfrom
tv-less-psr4-namespace

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

No description provided.

@TomasVotruba TomasVotruba force-pushed the tv-less-psr4-namespace branch 3 times, most recently from fa4738e to 7a983ee Compare June 3, 2023 16:29
…iles to namespaces, does not update any class referenes; better use IDE here
@TomasVotruba TomasVotruba enabled auto-merge (squash) June 3, 2023 16:30
@TomasVotruba TomasVotruba merged commit 1d8b12d into main Jun 3, 2023
@TomasVotruba TomasVotruba deleted the tv-less-psr4-namespace branch June 3, 2023 16:32
@samsonasik
Copy link
Copy Markdown
Member

/cc @jtojnar

@jtojnar
Copy link
Copy Markdown
Contributor

jtojnar commented Jun 4, 2023

Thanks for letting me know. The removal is a bit disappointing but I guess it’s expected since we were unable to make the rector work properly. I had hopes for Rector becoming a one-stop shop for transformations of PHP code but I guess that was unrealistic. Especially for one-off global transformations like this.

Anyway, I am not aware of any IDE offering such functionality (maybe we could combine macros with single class/directory renaming?) nor do I work with PHP enough to justify adjusting to PHPStorm but https://github.com/lesphp/psr4-converter looks promising.

@TomasVotruba
Copy link
Copy Markdown
Member Author

@jtojnar It was not easy descission, but the rule was adding more work than saving. Changing just some class names was rather annoying.

As for IDE, we use "move class" or "move namespace" refactoring, that handles the same operation much better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants